package com.qfedu.controller;

import com.qfedu.model.Account;
import com.qfedu.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("account")
public class AccountController {
    public AccountController() {
        System.out.println("初始化了");
    }

    @Autowired
    private AccountService accountService;

    @RequestMapping("findAll")
    public List<Account> findAll(){
        List<Account> all = accountService.findAll();
        System.out.println(all);
        return all;
    }
}
